<template>
  <div class="last-address"
       @click="lastPosition">
    {{ row[preset.objName] }}
  </div>
</template>

<script>
export default {
  name: "last-address",
  props: {
    row: {
      type: Object,
      default: () => { }
    },
    preset: {
      type: Object,
      default: () => { }
    }
  },
  methods: {
    lastPosition () {
      let deviceCode = this.row.iMEICode;
      let token = sessionStorage.getItem("token");
      window.open(
        "http://192.168.1.168:81" +
        "?deviceCode=" +
        deviceCode +
        "&token=" +
        token
      );
    }
  }
};
</script>

<style lang="scss" scoped>
.last-address {
  width: 100%;
  color: var(--prev-color-primary);
  cursor: pointer;
  display: -webkit-box;
  word-break: break-all;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
</style>
